<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./CSS/Exer-1.css">
    <title>Exer-1</title>
    <!-- <meta http-equiv="refresh" content="1"> -->
</head>
<body>
    <h1>Orz-ing Game!</h1>
    <p id="1"></p>
    <script>
        var orz=0,every=1,pevery=10,follow=1,pfollow=100,velo=0.001,time=1000/velo,tap=0;
        function add()
        {
            tap++;
            orz+=every*follow;
        }
        function addvelo()
        {
            velo+=0.001;
        }
        function lvupevery()
        {
            if(orz>=pevery)
            {
                orz-=pevery;
                every++;
                pevery=Math.pow(every,2.1)+10;
            }
        }
        function intprice()
        {
            orz=Math.round(orz);
            every=Math.ceil(every);
            pevery=Math.round(pevery);
        }
        function update()
        {
            // console.log("您Orz了"+orz+"下 QwQ");
            velo=tap/1000;
            document.getElementById("1").innerHTML="您Orz了"+orz+"下, 需要"+pevery+"次升级, 现在是"+every+"级"+velo;
            // window.setTimeout("update();",2000);
        }
        function updateinterval()
        {
            window.setInterval(add,time);
        }
        window.setInterval(update,25);
        window.setInterval(intprice,20);
        window.setInterval(updateinterval,300);
    </script>
    <button onclick="add()">Orz</button>
    <button onclick="lvupevery()">Orz 等级+1</button>
</body>
</html>